﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StoreManagementSystem
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["loggeduser"] != null)
            {
                
                menuAccount.Visible = true;
            }
            else
            {
                menuAccount.Visible = false;
            }
        }

        protected void menuAccount_MenuItemClick(object sender, MenuEventArgs e)
        {
            if (e.Item.Text.Equals("Logout"))
            {
                Session["loggeduser"] = null;
                Response.Redirect("~/");
            }
        }
    }
}
